package io.adrainty.bolee.security.web;

import io.adrainty.bolee.framework.commons.basic.ResultDTO;
import io.adrainty.bolee.framework.commons.utils.ResultDTOUtil;
import io.adrainty.bolee.security.models.entity.CompanyEntity;
import io.adrainty.bolee.security.service.ICompanyService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.*;

/**
 * <p>CompanyController</p>
 *
 * @author AdRainty
 * @version V1.0.0
 * @description 企业管理接口
 * @since 2025/8/1 15:11:48
 */

@Tag(name = "企业管理接口")
@RestController
@RequestMapping("/company")
public class CompanyController {

    @Resource
    private ICompanyService companyService;

    @PutMapping
    @Operation(summary = "创建企业")
    public ResultDTO<CompanyEntity> createCompany(@RequestBody CompanyEntity companyEntity) {
        CompanyEntity result = companyService.createCompany(companyEntity);
        return ResultDTOUtil.success(result);
    }

}
